<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 严格检查模式："use strict" 放在首行
        // 对象
        //  var 对象名={
            // 属性名：属性值，
            // 属性名：属性值，
            // ....
        // } 
        // delete hhb.name删除属性
        // hhb.naem="hhb"                        
        var hhb={
            name:"hhb",
            age:18,
            arr:["hug","pyy","cyy"]
        }
        console.log(hhb.age);
        console.log();
        

        // 第二种new创建对象

        var hug= new Object();
   
         hug.name='hhb'
         hug.age=18
         hug.sex='nan'
         hug.fu=function(){
                  console.log('hhhh');
         }
      console.log(hug.name);//.属性名
      console.log(hug['age']);//也可以['属性名']
      hug.fu();
    </script>
</body>
</html>